import 'package:flutter/material.dart';

import 'chat_page.dart';
import 'my_page.dart';
import 'organization_page.dart';

class MainPageBody {
  static final MainPageBody _mainPageBody = MainPageBody._internal();

  factory MainPageBody() => _mainPageBody;

  MainPageBody._internal();

  final PageController _pageController = PageController();

  PageController get pageController => _pageController;

  Widget createBody(BuildContext context) {
    return PageView(
      scrollDirection: Axis.horizontal,
      physics: const NeverScrollableScrollPhysics(),
      controller: _pageController,
      children: const [
        ChatPage(),
        OrganizationPage(),
        MyPage(),
      ],
    );
  }
}
